package com.theme.passport.entity.constant;

public enum DocumentTypeEnum {

    SYS_NTRODUCTION(1, "系统介绍"),
    ABOUT_US(2, "关于我们"),
    SYS_TUTORIALS(3, "系统教程"),
    PRIVACY_POLICY(4, "隐私政策"),
    SERVICE_TERMS(5, "服务条款"),
    SYS_HELP(7, "系统帮助"),
    LATEST_NEWS(6, "最新资讯"),
    ;

    private int value;
    private String name;

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    DocumentTypeEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    @Override
    public String toString() {
        return "UserStatus{" +
                "value=" + value +
                ", name='" + name + '\'' +
                '}';
    }


    public static DocumentTypeEnum getDocumentTypeEnum(int value){
        for (DocumentTypeEnum name: values()) {
            if (name.value == value) {
                return name;
            }
        }
        return null;
    }

}
